package com.sense.kukoo.biz_me.model

import com.sense.kukoo.biz_me.net.MeHttpApi
import com.sense.kukoo.common.mvvm.model.BaseMvvmModel
import com.sense.kukoo.common.repo.bean.LoginBean
import com.sense.kukoo.common.repo.bean.ResultBean
import com.sense.kukoo.common.repo.http.KukooHttpManager
import com.sense.kukoo.lib_logger.LoggerManager
import okhttp3.RequestBody

class FeedbackModel:BaseMvvmModel() {

    private val TAG: String = javaClass.simpleName
    override fun onModelCleared() {}

    suspend fun feedback(
        content: String,
        contact: String,
    ): ResultBean<Boolean> {

        val hashMap = HashMap<String, Any>()
        hashMap.put("content", content)
        hashMap.put("contact", contact)
        val mRequestBody: RequestBody = KukooHttpManager.createRequestBody(hashMap)

        return KukooHttpManager.instance.createHttpClient(MeHttpApi::class.java).feedback(mRequestBody)
    }
}